#ifndef __START_SCENE_H_
#define __START_SCENE_H_

#include "cocos2d.h"
#include "SimpleAudioEngine.h"
#include "selectitemview.h"

#include "AppDelegate.h"

using namespace cocos2d;

namespace fireplane
{
	class SelectItemView;

	class StartScene : public cocos2d::CCLayer,public ClickItemCall
	{
	public:
		enum FocusByWho
		{
			FBW_not = 0,
			FBW_SelectItemView,
		};

		// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
		virtual bool init();  

		// there's no 'id' in cpp, so we recommand to return the exactly class pointer
		static cocos2d::CCScene* scene();


		static bool loadRes(void);
		// implement the "static node()" method manually

		LAYER_NODE_FUNC(StartScene);
		enum
		{
			SL_BG = 0,
		};

		virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent);
		virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent);
		virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent);

	private:
		virtual void onClickItem(int tag);
		void _createStartBg();
		void _createArrows();
		void _createMenuItem();
		void _createLogo();
		void registerWithTouchDispatcher();

		CCSprite* _left;
		CCSprite* _right;

		SelectItemView* _selectView;

		FocusByWho _FocusByWho;
	};
}

#endif  // __HELLOWORLD_SCENE_H__